﻿using Mondial2014.Models.Competition;

namespace Mondial2014.Utils.Extensions
{
    public static class FixtureModelExtensions
    {
        public static FixtureResult GetGameResult(this Fixture fixture)
        {
            if (fixture.Team1Score > fixture.Team2Score) return FixtureResult.Team1;
            if (fixture.Team1Score < fixture.Team2Score) return FixtureResult.Team2;
            return FixtureResult.Tie;
        }
    }
}